package org.example.ychdp.entity;

import java.io.Serializable;

/**
 * admin
 * @author 
 */
public class Admin implements Serializable {
    /**
     * 管理员 ID
     */
    private Integer adminid;

    /**
     * 管理员用户名
     */
    private String adminusername;

    /**
     * 管理员密码
     */
    private String adminpassword;

    /**
     * 管理员权限级别
     */
    private Integer permissionlevel;

    private static final long serialVersionUID = 1L;

    public Integer getAdminid() {
        return adminid;
    }

    public void setAdminid(Integer adminid) {
        this.adminid = adminid;
    }

    public String getAdminusername() {
        return adminusername;
    }

    public void setAdminusername(String adminusername) {
        this.adminusername = adminusername;
    }

    public String getAdminpassword() {
        return adminpassword;
    }

    public void setAdminpassword(String adminpassword) {
        this.adminpassword = adminpassword;
    }

    public Integer getPermissionlevel() {
        return permissionlevel;
    }

    public void setPermissionlevel(Integer permissionlevel) {
        this.permissionlevel = permissionlevel;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Admin other = (Admin) that;
        return (this.getAdminid() == null ? other.getAdminid() == null : this.getAdminid().equals(other.getAdminid()))
            && (this.getAdminusername() == null ? other.getAdminusername() == null : this.getAdminusername().equals(other.getAdminusername()))
            && (this.getAdminpassword() == null ? other.getAdminpassword() == null : this.getAdminpassword().equals(other.getAdminpassword()))
            && (this.getPermissionlevel() == null ? other.getPermissionlevel() == null : this.getPermissionlevel().equals(other.getPermissionlevel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAdminid() == null) ? 0 : getAdminid().hashCode());
        result = prime * result + ((getAdminusername() == null) ? 0 : getAdminusername().hashCode());
        result = prime * result + ((getAdminpassword() == null) ? 0 : getAdminpassword().hashCode());
        result = prime * result + ((getPermissionlevel() == null) ? 0 : getPermissionlevel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", adminid=").append(adminid);
        sb.append(", adminusername=").append(adminusername);
        sb.append(", adminpassword=").append(adminpassword);
        sb.append(", permissionlevel=").append(permissionlevel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}